

DISTRIBUTED_INCLUDE=-I.   -I /data/gsl/include  -I /data/boost/include   -I   /home/mat614/gsl/include -I /home/mat614/boost/include
DISTRIBUTED_LIB_PATH=   -L /data/gsl/lib  -L /data/boost/lib -L /home/mat614/gsl/lib -L /home/mat614/boost/lib



DISTRIBUTED_COMPILER_OPTIONS=-fopenmp -O3 -fpermissive -DHAVE_CONFIG_H -DAUTOTOOLS_BUILD   -DMPICH_IGNORE_CXX_SEEK 
#DISTRIBUTED_LINK= -lboost_mpi -lzoltan -lboost_timer -lboost_serialization -lboost_thread -lgsl -lgslcblas -lm 
DISTRIBUTED_LINK= -lgslcblas  -lboost_system -lboost_timer -lboost_chrono -lrt  -lboost_mpi -lboost_serialization -fopenmp  -lgsl -lm -lboost_thread


	
#MATLABROOT=/opt/programs/MATLAB/R2011a/
MATLABROOT=/usr/local/matlab/latest/

#===========================

#MKL_LIBS=    $(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group  $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -lpthread -lm
	

# compiler which should be used
MPICC = mpicc
MPICPP = mpicxx
#MPICPP = CC

#============================================================================================
# You should not modify the lines below
 
# Cluster Consolve Solver            
cocoaTest:
	$(MPICPP)   -O3 $(DISTRIBUTED_COMPILER_OPTIONS) $(DISTRIBUTED_INCLUDE) -DMATLAB  \
	-o $(BUILD_FOLDER)Cocoa \
	$(FRONTENDS)../cocoa/cocoa.cpp \
	-I $(MATLABROOT)/extern/include     \
	$(DISTRIBUTED_LIB_PATH)  $(DISTRIBUTED_LINK)   -Wl,-rpath=/home/mat614/boost/lib \
	-L $(MATLABROOT)bin/glnxa64    -leng -lmx  -Wl,-rpath=$(MATLABROOT)bin/glnxa64 
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A /work/mlData/file -l 0.1 -C 10 -I 1000 -f 1 -a 1  -p 0.001
	
	
asfdsafsafdfsa:	
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 10 -I 1 -f 4	
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 5 -I 1 -f 5	
	
	
asfddsafsa:	
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 10 -I 1 -f 4	-E sd
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 10 -I 1 -f 4	-E csd
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 10 -I 1 -f 4	-E cg

# 

asfsfa:
	mpirun -np 1 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 100 -I 500 -f 4

	
runall:	
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 100 -I 500 -f 0
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 100 -I 500 -f 1
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 100 -I 500 -f 2
	mpirun -np 4 $(BUILD_FOLDER)Cocoa -A data/a1a.4/a1a -l 0.1 -C 100 -I 500 -f 3
	
	
matlabtest:
	g++ src/test/matlabtest.cpp -I $(MATLABROOT)/extern/include   -o 	$(BUILD_FOLDER)MatlabTest  -L $(MATLABROOT)bin/glnxa64   -o 	$(BUILD_FOLDER)MatlabTest  -leng -lmx  -Wl,-rpath=$(MATLABROOT)bin/glnxa64 
	./$(BUILD_FOLDER)MatlabTest			